package com.situ.day06;

public class Retangle {
	private int width,high;

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHigh() {
		return high;
	}

	public void setHigh(int high) {
		this.high = high;
	}

	public Retangle(int width, int high) {
		super();
		this.width = width;
		this.high = high;
	}

	public Retangle() {
		width = 1;
		high = 1;
	}

	public Retangle(int width) {
		this.width = width;
		high = width;
	}
	
	//面积
	public int area(int high,int width) {
		return high * width;
	}
	
	//周长
	public int perimeter(int high,int width) {
		return (high + width) * 2;
	}
}
